From 6bf215bc15189bdcd6c7c0d63f410eca47cddf62 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 16 Nov 2017 23:22:08 -0500 Subject: [PATCH] Drop gdk_set_program_class Together with the corresponding getter. This is x11-specific functionality. --- docs/reference/gdk/gdk4-sections.txt | 8 +---- gdk/gdk.c | 48 ---------------------------- gdk/gdkmain.h | 5 --- 3 files changed, 1 insertion(+), 60 deletions(-) diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt index ce11ad3c1b..a4cc51fd54 100644 --- a/docs/reference/gdk/gdk4-sections.txt +++ b/docs/reference/gdk/gdk4-sections.txt @@ -5,13 +5,6 @@ General general - -gdk_get_program_class -gdk_set_program_class - - -gdk_flush - GdkGrabStatus @@ -92,6 +85,7 @@ gdk_display_device_is_grabbed gdk_display_beep gdk_display_sync gdk_display_flush +gdk_flush gdk_display_close gdk_display_is_closed gdk_display_get_event diff --git a/gdk/gdk.c b/gdk/gdk.c index a754e0e692..877046cd99 100644 --- a/gdk/gdk.c +++ b/gdk/gdk.c @@ -200,13 +200,6 @@ gdk_pre_parse (void) gdk_ensure_resources (); - /* We set the fallback program class here, rather than lazily in - * gdk_get_program_class, since we don't want -name to override it. - */ - gdk_progclass = g_strdup (g_get_prgname ()); - if (gdk_progclass && gdk_progclass[0]) - gdk_progclass[0] = g_ascii_toupper (gdk_progclass[0]); - #ifdef G_ENABLE_DEBUG { gchar *debug_string = getenv("GDK_DEBUG"); @@ -710,44 +703,3 @@ gdk_threads_add_timeout_seconds (guint interval, return gdk_threads_add_timeout_seconds_full (G_PRIORITY_DEFAULT, interval, function, data, NULL); } - -/** - * gdk_get_program_class: - * - * Gets the program class. Unless the program class has explicitly - * been set with gdk_set_program_class() or with the `--class` - * commandline option, the default value is the program name (determined - * with g_get_prgname()) with the first character converted to uppercase. - * - * Returns: the program class. - */ -const char * -gdk_get_program_class (void) -{ - if (gdk_progclass) - return gdk_progclass; - - return "GTK+ Application"; -} - -/** - * gdk_set_program_class: - * @program_class: a string. - * - * Sets the program class. The X11 backend uses the program class to set - * the class name part of the `WM_CLASS` property on - * toplevel windows; see the ICCCM. - * - * The program class can still be overridden with the --class command - * line option. - */ -void -gdk_set_program_class (const char *program_class) -{ - if (gdk_progclass_overridden) - return; - - g_free (gdk_progclass); - - gdk_progclass = g_strdup (program_class); -} diff --git a/gdk/gdkmain.h b/gdk/gdkmain.h index c0384b663d..f3b1f374e5 100644 --- a/gdk/gdkmain.h +++ b/gdk/gdkmain.h @@ -40,11 +40,6 @@ G_BEGIN_DECLS #define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT) -GDK_AVAILABLE_IN_ALL -const gchar * gdk_get_program_class (void); -GDK_AVAILABLE_IN_ALL -void gdk_set_program_class (const gchar *program_class); - /* Push and pop error handlers for X errors */ GDK_AVAILABLE_IN_ALL -- 2.30.2